const Http = require("./Http");

class MovieHttp extends Http{
    //电影搜索
    static getMoviesByKey(keyword){
        return this.request(`:4000/api/search?keyword=${keyword}`)
    }
    //top250
    static getTop250(){
        return this.request(":4000/api/movie/top250")
    }
    //即将上映
    static getNew(){
        return this.request(":4000/api/movie/comingSoon")
    }
    //正在热映
    static getInTheaters(){
        return this.request(":4000/api/movie/inTheaters")
    }
    //根据id获取电影详情
    static getMovieDetailById(id){
        return this.request(`:4000/api/movieDetail?id=${id}`)
    }
    static getHttp(url){
        return this.request(url);
    }
}

module.exports = MovieHttp;